<template>
  <div id="app">
  <w-header :seller="seller"></w-header>
  <tab></tab>
  <keep-alive>
  <router-view >

  </router-view>
  </keep-alive>
  <w-footer></w-footer>

  </div>

</template>

<script type="text/ecmascript-6">
import WHeader from './components/header/header.vue'
import WFooter from './components/footer/footer.vue'
import Tab from 'components/tab/tab'
const ERR_OK = 0

export default {
  data () {
    return {
      seller: {}
    }
  },
  created () {
    let url = 'http://120.132.148.73/vshop/mshop/Home/getShopHeaderInfo?access_token=21f56fd0fccbd615ccc010b8a41fd81d&wx_id=7'
    this.$http.get(url).then((res) => {
      console.log(res)
      if (res.data.code === ERR_OK) {
        this.seller = res.data.data
        console.log(this.seller)
      }
    })
  },
  components: {
    WHeader,
    WFooter,
    Tab
  }
}
</script>
<style lang="stylus" scoped rel="stylesheet/stylus">
@import "~common/stylus/variable"
@import "~common/stylus/mixin"
  .tab
    display:flex
    width:100%
    height:40px
    line-height:40px
    border-1px(rgba(7,17,27,0.1))
    .tab-item
     flex:1
     text-align:center
     &>a
       display:block
       font-size:14px
       color:rgb(77,85,93)
       &.active
         color:rgb(240,20,20)

</style>
